package com.day22.MyString;

public class MyStringDemo {
    public static void main(String[] args)
    {
        useMyString((s,x,y) -> s.substring(x,y));
        useMyString(String::substring);
    }
    private static void useMyString(MyString my)
    {
        String s= my.mySubString("helloWorld",2,5);
        System.out.println(s);
    }
}
